<?php
if(!isset($hide))
	$hide = array();		
?>


<script type="text/javascript">
function refresh(orderField){
	var pageNumber = 1;
	if(!orderField) orderField = '';
	document.getElementById('updateView').style.display = 'block';
	var ancienClassName = document.getElementById('items_list').className;
	document.getElementById('items_list').className = ancienClassName + ' working';
	getXmlHttpRequest();
	xhr.onreadystatechange = function(){
		if(xhr.readyState == 4 && xhr.status == 200)
			{
			textResponse = xhr.responseText;
			document.getElementById('updateView').style.display = 'none';
			document.getElementById('items_list').className = ancienClassName;
			//document.getElementById('listeDemandes').style.opacity = 1;
			document.getElementById('items_list').innerHTML = textResponse;
		}
	};
	xhr.open("POST","<?php print url_for($module.'/renderDocumentationList'); ?>",true);
	xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xhr.send("page="+pageNumber+"&order="+orderField+"&className=<?php echo $objDef->className;?>");		
}
</script>

<h1><?php echo __('List of ') . $objDef->labelPlural?></h1>

<?php include_partial('search/searchBar',array( 'className' => $objDef->className, 'moduleRef' => $module, 'actionRef' => 'index'))?>

	<div id="updateView" style="display:none;text-align:center;">
	<img alt="<?php echo __('wait please...')?> '" src="/images/ajax-loader.gif">
	</div>
	<div id="items_list"></div>

<script type="text/javascript">
	addFilters();
</script>